import * as ApiTypes from '@/api/project/project.d';
import { LoginRes } from '@/api/user/user.d';
interface Item {
  id: number;
  name: string;
}
export interface ProjectDetailState {
  ready: boolean;
  taskId: number | null;
  step: number;
  form: ProjectDetailViewForm;
  commonList: ApiTypes.CommonConfigResponse;
  compList: ApiTypes.CompConfigItem[];
  compTotal: number;
  toolList: ApiTypes.ToolConfigItem[];
  lesionList: ApiTypes.LesionConfigItem[];
  apiForm: ProjectDetailStateForm;
  userList: LoginRes[];
  userTotal: number;
  companyList: ApiTypes.CompanyConfigItem[];
  // compAlertList: SeriesDataItem[];
}

export interface ProjectDetailViewForm {
  basicSetting: ViewBasicSetting;
  annoSetting: ViewAnnoSetting;
  dataSetting: ViewDataSetting;
  annoUserSetting: ViewAnnoUserSetting;
}

export interface ProjectDetailStateForm {
  basicSetting: BasicSetting;
  annoSetting: AnnoSetting;
  dataSetting: DataSetting;
  annoUserSetting: AnnoUserSetting;
}

export interface ViewBasicSetting {
  name: string;
  department: string;
  discardCode: string[];
  label: string;
  target: string;
  uses: string;
}

export interface ViewAnnoSetting {
  defaultWindow: string;
  findings: boolean;
  diagnosis: boolean;
  showYay: boolean;
  showReport: boolean;
  imageLayout: string;
  seriesFcList: number[];
  seriesDataList: SeriesDataItem[];
  lesionList: string[];
  lesionDataList: LesionDataList[];
}

export interface SeriesDataItem extends ApiTypes.CompConfigItem {
  required: boolean;
}

export interface LesionDataList extends ApiTypes.LesionItem {
  imageList: number[];
  imageDataList: SeriesDataItem[];
}

export interface ViewDataSetting {
  seriesList: any[];
}

export interface ViewAnnoUserItem {
  companyId?: number|undefined;
  company?: Item;
  userIdList?: number[];
  userList: LoginRes[];
}

export interface ViewAnnoUserSetting {
  beginDate: number;
  endDate: number;
  remark: string;
  pubMethod: number;
  assignMethod: number;
  crossNum: number;
  annoUserList: ViewAnnoUserItem[];
}
export interface BasicSetting {
  name: string;
  department: string;
  discardCode: string[];
  label: string;
  target: string;
  uses: string;
}

export interface AnnoSetting {
  defaultWindow: string;
  findings: boolean;
  diagnosis: boolean;
  showYay: boolean;
  showReport: boolean;
  imageLayout: string;
  seriesFcList: ApiTypes.FcItem[];
  lesionList: ApiTypes.LesionItem[];
}

export interface DataSetting {
  seriesList: any[];
}

export interface AnnoUserItem {
  companyId: number;
  userIdList: number[];
}
export interface AnnoUserSetting {
  beginDate: number;
  endDate: number;
  remark: string;
  pubMethod: number;
  assignMethod: number;
  crossNum: number;
  annoUserList: AnnoUserItem[];
}
